﻿using QxFramework.Core;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class testforcreate : MonoBehaviour
{
    // Start is called before the first frame update
    public List<GameObject> hexs;
    void Start()
    {
        List<GameObject> G = new List<GameObject>();
        for (int i = 1; i < 20; i++)
        {
            G.Add(ResourceManager.Instance.Instantiate("Prefabs/Cubes/" + i));
        }
        GameObject m = GameObject.Find("LevelMap");
        foreach (var i in G)
        {
            GameObject t = ResourceManager.Instance.Instantiate("Prefabs/Cubes/Shining");
            t.name = i.name;
            t.GetComponent<hexagon>().Pos = i.GetComponent<hexagon>().Pos;
            t.transform.SetParent(m.transform);
        }
        /*hexs = new List<GameObject>();
        for(int i= 0; i < 19; i++)
        {
            hexs.Add(transform.GetChild(i).gameObject);
        }*/
        
    }

    // Update is called once per frame
    void Update()
    {
        
    }
}
